1. Field of the Invention
Embodiments of the present invention relate to scalable audio data decoding, and more particularly, to a scalable audio data arithmetic decoding method, medium, and apparatus, and a method, medium, and apparatus truncating an audio data bitstream.
2. Description of the Related Art
Audio lossless encoding techniques have been required for audio broadcasting and/or archiving purposes. Major technologies for lossless audio encoding include application of an entropy encoder using time/frequency transformation or linear prediction, for example.
When scalability through bitstream re-parsing is applied, for example, a bitstream corresponding to a frame is truncated at an arbitrary position, at a server end, and transmitted to a decoding end.
FIG. 1 illustrates a conventional arithmetic decoding method.
First, initialization is performed, in operation 100, and a symbol desired to be decoded is detected, in operation 110. By using the corresponding context, a probability value for the symbol can be calculated, in operation 120, and arithmetic decoding can then be performed, in operation 130. Here, the probability value for a symbol corresponds to the probability that a symbol is a ‘1’ or ‘0’, for example where the symbol is a binary number. Whether the symbol is the end of the bitstream can then be checked, in operation 140, and if the symbol is not the end of the bitstream, a symbol to be decoded can again be determined and the above operations may be repeated. The decoding is finished when the symbol is determined to be the end of the bitstream.
Meanwhile, when an arithmetic decoding method is performed, all of the symbols to be decoded are known, or a predetermined termination code is inserted, and the decoder is informed of the time when the decoding should be finished. However, when a bitstream is truncated, as shown in FIG. 2, this information, indicating the termination code, is cut off and the decoder cannot know when to finish the decoding. Thus, since the accurate termination time is not known, data that is not desired may be decoded.